package main

import "fmt"

type Person struct {
	name string
	age  int
}
type Student struct {
	Person
	score float64
}

func (p Person) printInfo() {
	fmt.Println("这是父类中的方法")
}
func (s Student) printInfo() {
	fmt.Println("这是子类中的方法")
}
func main() {
	var stu Student
	stu.printInfo()
	stu.Person.printInfo()
}
